package springdao.support;

import org.hibernate.LockOptions;

/**
 *
 * @author Kent Yeh
 */
public class LockParser {

    @SuppressWarnings("deprecation")
    public static LockOptions parse(String mode) {
        if ("READ".equals(mode)) {
            return LockOptions.READ;
        } else if ("UPGRADE".equalsIgnoreCase(mode)) {
            return LockOptions.UPGRADE;
        } else {
            return LockOptions.NONE;
        }
    }
}
